package com.dylearn.domain;

import lombok.Data;

import java.io.Serializable;

@Data
public class Book implements Cloneable, Serializable {
    public int id;
    private String type;
    private String name;
    private String description;


    /**
     * @Author zhangdingyi
     * @Date 2022-08-13 14:18
     * @Content 测试ToString format 的方法
     */
    @Override
    public String toString() {
        return String.format("(%3d) %s-%s", id, type, name);
    }

    public Book() {
        super();
    }

    @Override
    public Book clone() throws CloneNotSupportedException {
        return (Book)super.clone();
    }
}
